package edu.hnu.tradeserver.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName trades
 */
@TableName(value ="trades")
@Data
public class Trades implements Serializable {
    /**
     * 
     */
    @TableField(value = "client_name")
    private String client_name;

    /**
     * 
     */
    @TableField(value = "ticker")
    private String ticker;

    /**
     * 
     */
    @TableField(value = "ric")
    private String ric;

    /**
     * 
     */
    @TableField(value = "size")
    private String size;

    /**
     * 
     */
    @TableField(value = "price")
    private Long price;

    /**
     * 
     */
    @TableField(value = "currency")
    private Long currency;

    /**
     * 
     */
    @TableField(value = "issuer_sector")
    private String issuer_sector;

    /**
     * 
     */
    @TableField(value = "salesperson")
    private String salesperson;

    /**
     * 
     */
    @TableField(value = "ht_pt")
    private String ht_pt;

    /**
     * 
     */
    @TableField(value = "client_side")
    private String client_side;

    /**
     * 
     */
    @TableField(value = "trade_date")
    private Date trade_date;

    /**
     * 
     */
    @TableField(value = "notional_USD")
    private Long notional_USD;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Trades other = (Trades) that;
        return (this.getClient_name() == null ? other.getClient_name() == null : this.getClient_name().equals(other.getClient_name()))
            && (this.getTicker() == null ? other.getTicker() == null : this.getTicker().equals(other.getTicker()))
            && (this.getRic() == null ? other.getRic() == null : this.getRic().equals(other.getRic()))
            && (this.getSize() == null ? other.getSize() == null : this.getSize().equals(other.getSize()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency()))
            && (this.getIssuer_sector() == null ? other.getIssuer_sector() == null : this.getIssuer_sector().equals(other.getIssuer_sector()))
            && (this.getSalesperson() == null ? other.getSalesperson() == null : this.getSalesperson().equals(other.getSalesperson()))
            && (this.getHt_pt() == null ? other.getHt_pt() == null : this.getHt_pt().equals(other.getHt_pt()))
            && (this.getClient_side() == null ? other.getClient_side() == null : this.getClient_side().equals(other.getClient_side()))
            && (this.getTrade_date() == null ? other.getTrade_date() == null : this.getTrade_date().equals(other.getTrade_date()))
            && (this.getNotional_USD() == null ? other.getNotional_USD() == null : this.getNotional_USD().equals(other.getNotional_USD()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getClient_name() == null) ? 0 : getClient_name().hashCode());
        result = prime * result + ((getTicker() == null) ? 0 : getTicker().hashCode());
        result = prime * result + ((getRic() == null) ? 0 : getRic().hashCode());
        result = prime * result + ((getSize() == null) ? 0 : getSize().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode());
        result = prime * result + ((getIssuer_sector() == null) ? 0 : getIssuer_sector().hashCode());
        result = prime * result + ((getSalesperson() == null) ? 0 : getSalesperson().hashCode());
        result = prime * result + ((getHt_pt() == null) ? 0 : getHt_pt().hashCode());
        result = prime * result + ((getClient_side() == null) ? 0 : getClient_side().hashCode());
        result = prime * result + ((getTrade_date() == null) ? 0 : getTrade_date().hashCode());
        result = prime * result + ((getNotional_USD() == null) ? 0 : getNotional_USD().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", client_name=").append(client_name);
        sb.append(", ticker=").append(ticker);
        sb.append(", ric=").append(ric);
        sb.append(", size=").append(size);
        sb.append(", price=").append(price);
        sb.append(", currency=").append(currency);
        sb.append(", issuer_sector=").append(issuer_sector);
        sb.append(", salesperson=").append(salesperson);
        sb.append(", ht_pt=").append(ht_pt);
        sb.append(", client_side=").append(client_side);
        sb.append(", trade_date=").append(trade_date);
        sb.append(", notional_USD=").append(notional_USD);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}